<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<!-- 加入easyui -->
	<link rel="stylesheet" type="text/css" href="<%=basePath%>js/jquery-easyui-1.3.5/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>js/jquery-easyui-1.3.5/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>js/jquery-easyui-1.3.5/demo.css">
    <script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.3.5/jquery.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
  	<script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
  	
</head>
<script type="text/javascript">
$(function(){
		var treeData = [{
			id:1,
			text:"系统维护",
			children:[{
				text:"用户管理",
				attributes:{
					url:"<%=basePath%>adminget"
				}
			}]
		},
		{	
			id:2,
		    text:"项目完成进度分析",
		    children:[{
				text:"项目完成进度",
				attributes:{
					url:"<%=basePath%>adminpie"
				}
			}]
		},
		{	
			id:3,
		    text:"符合率分析",
		    children:[{
				text:"系统符合率",
				attributes:{
					url:"<%=basePath%>systempie"
				}
			},
			{
				text:"设备符合率",
				attributes:{
					url:"<%=basePath%>equipmentpie"
				}
			}]
		},
		{	
			id:4,
		    text:"查询",
		    children:[{
				text:"查询记录",
				attributes:{
					url:"<%=basePath%>searchlist"
				}
			}]
		},
		{	
			id:5,
		    text:"风险率",
		    children:[{
				text:"单系统风险",
				attributes:{
					url:"<%=basePath%>singlesystempie"
				}
			},
			{
				text:"全系统风险",
				attributes:{
					url:"<%=basePath%>allsystempie"
				}
			}]
		}
		
		];
	
		$("#tree").tree({
			data:treeData,
			lines:true,
			onClick:function(node){
			if(node.attributes){
				openTab(node.text,node.attributes.url);
			}
		}
		});
		
		// 新增Tab
	function openTab(text,url){
		if($("#tabs").tabs('exists',text)){
			$("#tabs").tabs('select',text);
		}else{
			var content="<iframe frameborder='0' scrolling='auto' style='width:100%;height:100%' src="+url+"></iframe>";
			$("#tabs").tabs('add',{
				title:text,
				closable:true,
				content:content
			});
		}
	}
		
	});
</script>
<body class="easyui-layout">
 <!-- 正上方panel -->  
    <div region="north" style="height:50px;padding:10px;" href="">
    	<c:if test="${empty sessionScope.currentUser}">
		<script type="text/javascript">
			window.location.href = "<%=basePath%>login";
		</script>
	</c:if>
	<c:if test="${!empty sessionScope.currentUser}">
		欢迎${sessionScope.currentUser.account }回来。。。
	</c:if>
	<a href="<%=basePath%>logout">退出</a>
    </div>  
  <div region = "center">
		<div class="easyui-tabs" fit="true" border="false" id="tabs">
			<div title="首页">
				<div align="center" style="padding-top: 200px;" >
				<img src="images/logo1.png"><br>
				<font color="blue" style="font-family: 幼圆;font-size: 25px;" size="14">统计分析系统</font>
				</div>
			</div>
		</div>
	</div>
	<div region = "west" style="width: 200px;" title="导航" split="true">
		<ul id="tree"></ul>
	</div>
	<div region = "south" style="height:25px;" align="center">版权所有：AtStudio 2014</div>
  </body>
</html>
